package com.smart.tool.retry.core;

import com.smart.tool.retry.core.Attempt;

/**
 * @Author gao.gwq
 * @Version StopStrategy.java, v 0.1 2023年09月18日 16:26 gao.gwq
 * @Description: TODO
 */
public interface StopStrategy {

    /**
     * Returns <code>true</code> if the retryer should stop retrying.
     *
     * @param failedAttempt the previous failed {@code Attempt}
     * @return <code>true</code> if the retryer must stop, <code>false</code> otherwise
     */
    boolean shouldStop(Attempt failedAttempt);
}
